package me.riverslob.test.mail;

/**
 * Created with IntelliJ IDEA.
 * User: zhm_zheng
 * Date: 13-8-14
 * Time: 下午5:48
 * To change this template use File | Settings | File Templates.
 */
public class SendMain {
    public static void main(String[] args){
        //这个类主要是设置邮件
        MailSenderInfo mailInfo = new MailSenderInfo();
        mailInfo.setMailServerHost("mail.zuche.com");
        mailInfo.setMailServerPort("587");
        mailInfo.setValidate(true);
        mailInfo.setUserName("bookcars");
        mailInfo.setPassword("bookcars!3");//您的邮箱密码
        mailInfo.setFromAddress("bookcars@hertz.com.cn");
        mailInfo.setToAddress("wuxian_succ@126.com");
        mailInfo.setSubject("设置邮箱标题_Hez_58722");
        mailInfo.setContent("设置邮箱内容1");
        //这个类主要来发送邮件
        SimpleMailSender sms = new SimpleMailSender();
        sms.sendTextMail(mailInfo);//发送文体格式
        sms.sendHtmlMail(mailInfo);//发送html格式
    }
}
